﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using mvLibrary;
using mvLibrary.Helpers.Utils;

namespace fenk.Stock.Consultas
{
    public partial class DetalleDeStock : BaseForm
    {
        public DetalleDeStock()
        {
            InitializeComponent();
        }

        public override void AfterCallProgram(string progName)
        {
           int lastRowIndex = gridStock.Rows.GetLastRow(DataGridViewElementStates.None);
           DataGridViewRow lastRow =  gridStock.Rows[lastRowIndex];

           lastRow.Cells[1].Value = UniItem.ExtractAsString(1);
           lastRow.Cells[2].Value = UniItem.ExtractAsString(2);
           lastRow.Cells[3].Value = UniItem.ExtractAsString(3);
           lastRow.Cells[4].Value = UniItem.ExtractAsString(4);
           lastRow.Cells[5].Value = UniItem.ExtractAsString(5);
           lastRow.Cells[6].Value = UniItem.ExtractAsString(6);
           lastRow.Cells[7].Value = UniItem.ExtractAsString(7);
           lastRow.Cells[8].Value = UniItem.ExtractAsString(8);
           lastRow.Cells[9].Value = UniItem.ExtractAsString(9);
           lastRow.Cells[10].Value = UniItem.ExtractAsString(10);
           lastRow.Cells[11].Value = UniItem.ExtractAsString(11);
           lastRow.Cells[12].Value = UniItem.ExtractAsString(12);
        }

        private void DetalleDeStock_Load(object sender, EventArgs e)
        {
            butSave.Enabled = false;
        }
    }
}
